用刷題來練RUST主要分兩部分
熟悉Rust語言
資料結構與演算法
Day 2 疊代器Iterator & Match & 巨集Marco
Day 3 collect & 所有權 ownership & 借用檢查 borrow check
Day22 Double Linked List & Weak & Rust LinkedList
Day17 如何自定義Priority Queue Top K比較方式
Day 11 stack 深度優先搜尋(Depth First Search)
Day 13 Queue 廣度優先搜尋(Breadth First Search)
Day17 如何自定義Priority Queue Top K比較方式
Day18 Priority Queue 多來源合併、多任務佇列
Day22 Double Linked List & Weak & Rust LinkedList
DFS
Binary Search Tree
BFS
建圖
DFS & BFS
DSU
函式語言(functional programming)
在使用std::collections有用到許多跟functional programming相關的譬如HashMap中的
hashmap.entry(num).and_modify(|count| *count+=1).or_insert(1);
可以閱讀函式語言功能:疊代器與閉包
物件導向(Object-oriented programming,OOP)
我們能在自定義結構與實作中發現,Rust 沒有 class,但 struct + impl 組合就等同於「類別 + 方法」。
可以閱讀Rust 的物件導向程式設計特色
模式與配對
在解題中常會使用 let Some(node)、while let Some(node)
,使用方法可以看模式與配對
我們可以參考Roadmap.sh Data Structures & Algorithms,本次30天系列文主要集中在Basic、Tree、Graph Data Structures,如果要延伸閱讀下去可以參考
Sorting Algorithms
Search Algorithms
AVL Trees、B Trees
Graph 有權重的shortest path algorithm
Problem Solving Techniques